package com.finance.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.finance.entity.LoanBasic;

@Repository("adminLoanBasicDao")
public interface LoanBasicDao {

	public void add(LoanBasic loanBasic);

	/**
	 * 查询未还款记录
	 * 
	 * @param yhUserId
	 * @param userId
	 * @return
	 */
	public List<LoanBasic> loanBasicListMoney(
			@Param("yhUserId") String yhUserId, @Param("userId") String userId,
			@Param("stillState") Integer stillState,
			@Param("loanId") String loanId);

	/**
	 * 更新
	 */
	public void update(LoanBasic loanBasic);

	/**
	 * 查看逾期金额
	 */
	public double findByOverMoney();

	public List<LoanBasic> list();

	/**
	 * 通过还款状态查询
	 */
	public List<LoanBasic> findByState(Integer stillState);

	/**
	 * 查询每一笔贷款的还款list
	 */
	public List<LoanBasic> findByLoanIdUserId(@Param("loanId") String loanId,
			@Param("yhUserId") String yhUserId,
			@Param("stillState") Integer stillState);

	public LoanBasic findById(String loanBasicId);

}
